public class text6 {
    public static int fun6(int[] array){
        int ret=0;
        for(int i=0;i< array.length;i++){
            ret ^=array[i];
        }
        return ret;
    }

    public static void main(String[] args) {
        int[] array={1,1,2,2,4};
        int x=fun6(array);
        System.out.println(x);
    }
}
